Script: if objValue="Open" then ┬ global priceFactor┬ get wsGet(wdID,"multiplier:","Hilite")┬ if it=true then┬ set numberFormat to "0.000"┬ wsSet wdID,"mult","Disabled","false"┬ wsSet wdID,"change","Disabled", "false"┬ get wsGet(wdID,"newprice","Text")┬ if it¡empty then┬ wsSet wdID,"newprice","Text",it*priceFactor┬ end if┬ else┬ wsSet wdID,"mult","Disabled","true"┬ wsSet wdID,"change","Disabled", "true"┬ end if┬ wsSet wdID,"newprice","Selection", "0,10"┬end if
Script: get wsGet(wdID,"newprice","text")┬if (it=empty) or (it=0) then┬ alertNote("Enter a price, cancel or skip.")┬else┬ wsSend wdID,"0","close"┬end if
ItemType: PUSH
Rect: 120,88,200,108
Name: cancel
CancelItem: TRUE
AutoClose: TRUE
ItemType: PUSH
Rect: 15,80,95,100
Visible: FALSE
Name: skip
AutoClose: TRUE
ItemType: TEXT
Rect: 8,5,288,23
TextSize: 12
AutoSize: FALSE
Name: Stock
ItemType: TEXT
Rect: 10,124,310,156
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Name: instr
Text: Enter the price either as decimals or with a space between the whole number and fraction {e.g., 67.125 or 67 1/8}.
ItemType: TEXT
Rect: 82,32,182,54
TextSize: 12
AutoSize: FALSE
Name: newprice
LockText: FALSE
TextAlign: Right
ItemType: PUSH
Rect: 283,3,305,23
AutoSize: FALSE
Name: ?
Script: get wsGet(wdID,"0","Height")┬if it>200 then┬ wsSet wdID,"0","Height", "118"┬else┬ wsSet wdID,"0","Height", "282"┬end if
ItemType: LBL
Rect: 2,34,83,50
TextFont: Geneva
TextSize: 12
Text: Price/share:
ItemType: TEXT
Rect: 10,162,310,322
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Name: instr2
Text: Checking ╥multiplier╙ will show the price multiplied by a factor so that you can easily compare it with your new entry. The default multiplier that appears here is set in the Preferences section. Enter a multiplier besides 1.00 (click ╥change╙) if you want the price displayed to be a multiple of the ╥standard╙ price (e.g., if you enter cents rather than dollars, set the multiplier to be 100 to convert from standard ╥dollar╙ format). The price will be converted back to ╥standard╙ format for storage in the stack.
ItemType: CHK
Rect: 188,34,267,47
TextFont: Geneva
TextSize: 10
Name: multiplier:
Script: get wsGet(wdID,"mult","Text")┬put it into mm┬get wsGet(wdID,"newprice","Text")┬put it into thePrice┬if thePrice¡empty then┬ get wsGet(wdID,"multiplier:","Hilite")┬ put it into hh┬ set numberFormat to "0.000"┬ if hh=true then┬ wsSet wdID,"newprice","Text",thePrice*mm┬ wsSet wdID,"mult","Disabled","FALSE"┬ wsSet wdID,"change","Disabled","FALSE"┬ else┬ wsSet wdID,"newprice","Text",thePrice/mm┬ wsSet wdID,"mult","Disabled", "true"┬ wsSet wdID,"change","Disabled", "true"┬ end if┬ wsSet wdID,"newprice","Selection", "0,10"┬end if
ItemType: TEXT
Rect: 267,34,312,47
TextFont: Geneva
TextSize: 10
AutoSize: FALSE
Disabled: TRUE
Name: mult
Text: 1.00
ItemType: PUSH
Rect: 265,51,301,67
TextFont: Geneva
TextSize: 9
AutoSize: FALSE
Disabled: TRUE
Name: change
Script: get wsGet(wdID,"mult","Text")┬put it into oldM┬if oldM=empty or oldM=0 then put "1.00" into oldM┬put windowScript("New multiplier",wstl(200,200),oldM) into rr┬if line 1 of rr="OK" then┬ put line 2 of rr into mm┬ set the numberFormat to "0"┬ if mm<1000 then set the numberFormat to "0.00"┬ if mm<1 then set the numberFormat to "0.0000"┬ add 0 to mm┬ put "Stock Price" into wdID --Ñ┬ wsSet wdID,"mult","Text",mm┬ get wsGet(wdID,"newPrice","Text")┬ put it into thePrice┬ if thePrice¡empty then┬ set numberFormat to "0.000"┬ wsSet wdID,"newprice","Text",(thePrice*mm/oldM)┬ wsSet wdID,"newprice","Selection","0,10"┬ end if┬end if